/**
 *  ValueWheel.vala
 *
 *  Copyright (c) 2007 Marcelo Lira dos Santos <setanta@gmail.com>
 *
 *  Author: Marcelo Lira dos Santos <setanta@gmail.com>
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License as
 *  published by the Free Software Foundation; either version 2 of the
 *  License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 *  USA
 */

using GLib;
using Gtk;
using Cairo;

public class ValueWheel: Gtk.DrawingArea
{

    public string name { get; set; }

    public signal void value_changed ();

    public ValueWheel(int total_points, int min_value, int max_value) {
    }

    construct {
        add_events(Gdk.EventMask.BUTTON_MOTION_MASK |
                   Gdk.EventMask.BUTTON_PRESS_MASK |
                   Gdk.EventMask.BUTTON_RELEASE_MASK);

        expose_event += do_expose_event;
    }

    bool do_expose_event (Widget widget, Gdk.Event event) {
        stdout.printf("1111\n");
    }

    static int main (string[] args) {
        Gtk.init(out args);

        var window = new Window(WindowType.TOPLEVEL);
        window.destroy += Gtk.main_quit;

        window.title = "ValueWheel";
        window.set_default_size(500, 400);

        var wheel = new ValueWheel(15, -4, 6);
        //wheel.value_changed += 

        window.show_all();

        Gtk.main();

        return 0;
    }
}

